from collections import Counter

class Solution(object):
    def isNStraightHand(self, hand, groupSize):
        """
        :type hand: List[int]
        :type groupSize: int
        :rtype: bool
        """
        if len(hand) % groupSize != 0:
            return False
        
        count = Counter(hand)
        keys = sorted(count)
        
        for card in keys:
            if count[card] > 0:
                times = count[card]
                for i in range(groupSize):
                    if count[card + i] < times:
                        return False
                    count[card + i] -= times
        return True
